<?php

namespace app\yyq\validate;

use think\Validate;

class Contactus extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name'  => 'require|max:25',
        'tel'   => 'require|max:11',
        'email' => 'require|email|max:30'
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '姓名不能为空',
        'name.max'     => '姓名最多不能超过25个字符',
        'tel.require'  => '电话不能为空',
        'tel.max'      => '电话最多不能超过11个字符',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
